#include "ESP32S3ConsoleApplication.h"
#include "esp_log.h"
#include "esp_ota_ops.h"
#include "esp_http_client.h"
#include "esp_https_ota.h"
#include "esp_crt_bundle.h"

ESP32S3ConsoleApplication::ESP32S3ConsoleApplication()
{
    SetScriptApplication(GetLuaScriptApplication());
}

void ESP32S3ConsoleApplication::InitEnvironment()
{
    PlatformApplication::InitEnvironment();

    GetLuaScriptApplication()->DoString(R"(
print("hello world");
    )",
                                        "main.lua");
}

void ESP32S3ConsoleApplication::Init()
{
    PlatformApplication::Init();

    ConnectWiFi("TF-Office", "nplbaseT");

    HttpsOTAUpgrade("http://10.27.2.73:8088/esp32_vscode/LiteAppDemo/main.bin");
}
